<template>

    <div id="safety-measures" class="w-h-100 pos-r flex-1 apply-container page-public-s" style="box-sizing: border-box;overflow:hidden;">
        <div class="w-h-100 ver-flex pos-a" style="box-sizing: border-box; padding: 6px;">
            <div style="box-sizing: border-box;">
                <el-card shadow="never" :body-style="{ paddingBottom: '0' }">
                    <el-form class="box-f" ref="queryForm" :inline="true">
                        <el-form-item :label="$t('b0t63v7bGsmbXkQdwW4Q0')">
                            <el-select 
                                v-model="searchVal" 
                                filterable 
                                class="m-2" 
                                :placeholder="$t('g6AmUBb2H8qwj8DuC0TH')" 
                                @change="searchChange"
                            >
                                <el-option
                                    v-for="item in searchOptions"
                                    :key="item.value"
                                    :label="item.label"
                                    :value="item.value"
                                />
                            </el-select>
                        </el-form-item>
                        <el-form-item>
                            <!-- 模糊查询 -->
                            <template v-if="searchVal === '1'">
                                <el-input v-model="transferVal" :placeholder="$t('yeyw245R7a6VYy19Otp1n')" />
                            </template>
                            <!-- 巡检编号 -->
                            <template v-else-if="searchVal === '2'">
                                <el-input v-model="transferVal" :placeholder="$t('ysIavqEMgMswxJan_7gbO')" />
                                <!-- <el-select 
                                    v-model="transferVal" 
                                    filterable 
                                    class="m-2" 
                                    :placeholder="$t('4qSllUxIkPaA8Rqf3Jg8y')" 
                                    @change="acquireChange"
                                    value-key="id"
                                >
                                    <el-option
                                        v-for="item in responsiblePle"
                                        :key="item.value"
                                        :label="item.label"
                                        :value="item.value"
                                    />
                                </el-select> -->
                            </template>
                            <!-- 时间段查询 -->
                            <template v-else>
                                <el-date-picker
                                    v-model="transferVal"
                                    type="datetimerange"
                                    range-separator="-"
                                    :start-placeholder="$t('zxGaloajaAo1yMttcStime')"
                                    :end-placeholder="$t('zxGaloajaAo1yMttcEtime')"
                                    value-format="YYYY-MM-DD HH:mm:ss"
                                />
                            </template>
                        </el-form-item>
                        <el-form-item >
                            <el-button @click='searchClick' type="primary" icon="ele-Search"> {{ $t('a4Uw6qeAZpctNhl3u7Uge') }} </el-button>
                            <el-button @click="resetClick" icon="ele-Refresh"> {{ $t('rxCkXeM2sO75ltcf8JyVj') }} </el-button>
                        </el-form-item>
                    </el-form>
                </el-card>
            </div>

            <div style="box-sizing: border-box;" class="flex-1 pos-r">
                <div class="pos-a w-h-100" style="box-sizing: border-box;">
                    <el-card class="box-card w-h-100" shadow="never" style="margin-top: 16px;">
                        <div style="" class="w-h-100 ver-flex">
                            <div class="flex-1 pos-r">
                                <div class="pos-a w-h-100">

                                    <el-table :data="list" class="w-h-100" style="width: 100%" border v-loading="loading" element-loading-background="rgba(0, 0, 0, 0.5)">
                                        
                                        <!-- <el-table-column type="index" :label="$t('3eKEs1bExAXarYpdJemp')" width="55" align="center" :index="indexMethod" /> -->

                                        <el-table-column min-width="160" prop="v_SecurityCheckNO" :show-overflow-tooltip="true" :label="$t('ysIavqEMgMswxJan_7gbO')"  align="center">
                                            <el-table-column :show-overflow-tooltip="true" min-width="160" align="center">
                                                <template #header>
                                                    <el-input type="text" :placeholder="$t('ysIavqEMgMswxJan_7gbO')" v-model="searchVar.v_SecurityCheckNO" />
                                                </template>
                                                <template #default="scoped">
                                                    <span v-if="scoped.row.v_SecurityCheckNO">{{ scoped.row.v_SecurityCheckNO }}</span>
                                                    <span v-else>-</span>
                                                </template>
                                            </el-table-column>
                                        </el-table-column>
                                        
                                        <el-table-column min-width="200" :show-overflow-tooltip="true" :label="$t('5Yg118Gq0SphdlJxlLmTo')" align="center">
                                            <el-table-column :show-overflow-tooltip="true" min-width="200" align="center">
                                                <template #header>
                                                    <el-input type="text" :placeholder="$t('5Yg118Gq0SphdlJxlLmTo')" v-model="searchVar.n_SecurityCheckTimesNO" />
                                                </template>
                                                <template #default="scoped">
                                                    <span v-if="scoped.row.n_SecurityCheckTimesNO">{{ scoped.row.n_SecurityCheckTimesNO }}</span>
                                                    <span v-else>-</span>
                                                </template>
                                            </el-table-column>
                                        </el-table-column>
                                        
                                        <el-table-column min-width="160" :show-overflow-tooltip="true" :label="$t('tvGbL1MehJrp5EtEfWmB')"  align="center" fixed="left">
                                            <el-table-column :show-overflow-tooltip="true" min-width="160" align="center">
                                                <template #header>
                                                    <el-input type="text" :placeholder="$t('tvGbL1MehJrp5EtEfWmB')" v-model="searchVar.v_ProjectName" />
                                                </template>
                                                <template #default="scoped">
                                                    <span v-if="scoped.row.v_ProjectName">{{ scoped.row.v_ProjectName }}</span>
                                                    <span v-else>-</span>
                                                </template>
                                            </el-table-column>
                                        </el-table-column>

                                        <el-table-column min-width="160" :show-overflow-tooltip="true" :label="$t('oQmKga3tHw8a3L3sgt9Xn')" align="center" fixed="left">
                                            <el-table-column :show-overflow-tooltip="true" min-width="160" align="center">
                                                <template #header>
                                                    <el-input type="text" :placeholder="$t('oQmKga3tHw8a3L3sgt9Xn')" v-model="searchVar.hazardDetail" />
                                                </template>
                                                <template #default="scope">
                                                    <span>{{ scope.row.hazardDetail && scope.row.hazardDetail[0] && scope.row.hazardDetail[0].v_WorkExplain || '-' }}</span>
                                                </template>
                                            </el-table-column>
                                        </el-table-column>
                                        
                                        <el-table-column min-width="160" :show-overflow-tooltip="true" :label="$t('tmruUpoyR5Zja3zkb5oJg')" align="center" fixed="left">
                                            <el-table-column :show-overflow-tooltip="true" min-width="160" align="center">
                                                <template #header>
                                                    <el-input type="text" :placeholder="$t('tmruUpoyR5Zja3zkb5oJg')" v-model="searchVar.v_NGTypeName" />
                                                </template>
                                                <template #default="scope">
                                                    <span v-if="scope.row.v_NGTypeName">{{ scope.row.v_NGTypeName }}</span>
                                                    <span v-else>-</span>
                                                </template>
                                            </el-table-column>
                                        </el-table-column>
                                        
                                        <el-table-column min-width="160" :show-overflow-tooltip="true" :label="$t('yN3XgYqWhrFfTFd4jBtU6')"  align="center">
                                            <el-table-column :show-overflow-tooltip="true" min-width="160" align="center">
                                                <template #header>
                                                    <el-input type="text" :placeholder="$t('yN3XgYqWhrFfTFd4jBtU6')" v-model="searchVar.v_CheckNGContent" />
                                                </template>
                                                <template #default="scope">
                                                    <span v-if="scope.row.v_CheckNGContent">{{ scope.row.v_CheckNGContent }}</span>
                                                    <span v-else>-</span>
                                                </template>
                                            </el-table-column>
                                        </el-table-column>
                                        
                                        <el-table-column min-width="160" :show-overflow-tooltip="true" :label="$t('hgt8rkigvu07O3lOsGgc2')" align="center">
                                            <el-table-column :show-overflow-tooltip="true" min-width="160" align="center">
                                                <template #header>
                                                    <el-input type="text" :placeholder="$t('hgt8rkigvu07O3lOsGgc2')" v-model="searchVar.v_ExistsContent" />
                                                </template>
                                                <template #default="scope">
                                                    <span v-if="scope.row.v_ExistsContent">{{ scope.row.v_ExistsContent }}</span>
                                                    <span v-else>-</span>
                                                </template>
                                            </el-table-column>
                                        </el-table-column>
                                        
                                        <el-table-column width="260" :show-overflow-tooltip="true" :formatter="formatDate" :label="$t('05KrOcxT2AaBoabog6v9X')" align="center">
                                            <el-table-column :show-overflow-tooltip="true" width="260" align="center">
                                                <template #header>
                                                    <el-date-picker
                                                        class="set-t"
                                                        v-model="searchVar.d_AskCompliteDate"
                                                        type="datetime"
                                                        value-format="YYYY-MM-DD HH:mm:ss"
                                                        :placeholder="$t('xYKtSx361Hm1x9r3giOx')"
                                                        popper-class="el-date-p"
                                                    >
                                                    </el-date-picker>
                                                </template>
                                                <template #default="scope">
                                                    <span v-if="scope.row.d_AskCompliteDate">{{ scope.row.d_AskCompliteDate }}</span>
                                                    <span v-else>-</span>
                                                </template>
                                            </el-table-column>
                                        </el-table-column>
                                        
                                        <el-table-column width="260" :show-overflow-tooltip="true" :formatter="formatDate" :label="$t('bkOkR68JMiDBswcYfFzRt')" align="center">
                                            <el-table-column :show-overflow-tooltip="true" width="260" align="center">
                                                <template #header>
                                                    <el-date-picker
                                                        class="set-t"
                                                        v-model="searchVar.d_CompliteDate"
                                                        type="datetime"
                                                        value-format="YYYY-MM-DD HH:mm:ss"
                                                        :placeholder="$t('xYKtSx361Hm1x9r3giOx')"
                                                        popper-class="el-date-p"
                                                    >
                                                    </el-date-picker>
                                                </template>
                                                <template #default="scope">
                                                    <span v-if="scope.row.d_CompliteDate">{{ scope.row.d_CompliteDate }}</span>
                                                    <span v-else>-</span>
                                                </template>
                                            </el-table-column>
                                        </el-table-column>
                                        
                                        <el-table-column min-width="160" :show-overflow-tooltip="true" :label="$t('dyWnpvJ8oFsUicF0Oau4f')" align="center">
                                            <el-table-column :show-overflow-tooltip="true" min-width="160" align="center">
                                                <template #header>
                                                    <el-input type="text" :placeholder="$t('dyWnpvJ8oFsUicF0Oau4f')" v-model="searchVar.n_CheckChangeState" />
                                                </template>
                                                <template #default="scope">
                                                    <span v-if="scope.row.n_CheckChangeState === 0" style="color: #F56C6C;">{{ $t('uKt4PrCmupaNhgk8hhAo') }}</span>
                                                    <span v-if="scope.row.n_CheckChangeState === 1" style="color: #67C23A;">{{ $t('gsQNjjKc3Gdm5d9qiwHXk') }}</span>
                                                    <span v-if="scope.row.n_CheckChangeState === 2" style="color: #E6A23C;">{{ $t('b5krNrA5QBz0shYNj25') }}</span>
                                                </template>
                                            </el-table-column>
                                        </el-table-column>
                                        
                                        <!-- <el-table-column min-width="160" :show-overflow-tooltip="true" prop="c_CheckResult" :label="$t('wmfg6edJuImFjHpeTlbRu')" align="center" /> -->
                                        
                                        <el-table-column min-width="160" :show-overflow-tooltip="true" :label="$t('yZg4b_5Ls7c7fZd9uNw1g')" align="center">
                                            <el-table-column :show-overflow-tooltip="true" min-width="160" align="center">
                                                <template #header>
                                                    <el-input type="text" :placeholder="$t('yZg4b_5Ls7c7fZd9uNw1g')" v-model="searchVar.v_CheckChangeContent" />
                                                </template>
                                                <template #default="scope">
                                                    <span v-if="scope.row.v_CheckChangeContent">{{ scope.row.v_CheckChangeContent }}</span>
                                                    <span v-else>-</span>
                                                </template>
                                            </el-table-column>
                                        </el-table-column>
                                        
                                        <el-table-column min-width="160" :show-overflow-tooltip="true" :label="$t('ocC0miioNRiv0jSiehrb')" align="center">
                                            <el-table-column :show-overflow-tooltip="true" min-width="160" align="center">
                                                <template #header>
                                                    <el-input type="text" :placeholder="$t('ocC0miioNRiv0jSiehrb')" v-model="searchVar.v_CheckResultContent" />
                                                </template>
                                                <template #default="scoped">
                                                    <span v-if="scoped.row.v_CheckResultContent">{{ scoped.row.v_CheckResultContent }}</span>
                                                    <span v-else>-</span>
                                                </template>
                                            </el-table-column>
                                        </el-table-column>
                                        
                                        <el-table-column min-width="160" :show-overflow-tooltip="true" :label="$t('ms1fpd4AXyStopkHw95Z8')" align="center">
                                            <template #default="scope">
                                                <span style="cursor: pointer;" @click="fileClick(scope.row.v_CheckNgImagePath,1)" v-if="scope.row.v_CheckNgImagePath && scope.row.v_CheckNgImagePath.length !==0">{{ $t('2KyEk7Ir2Lz3bN9ByjSaE') }}</span>
                                                <span v-else>{{ $t('tzv7Fao_8LvfFbddIkvDu') }}</span>
                                            </template>
                                        </el-table-column>
                                        
                                        <el-table-column min-width="160" :show-overflow-tooltip="true" :label="$t('pAwlJ0p0qBAgZqdtvyyHh')" align="center">
                                            <template #default="scope">
                                                <span style="cursor: pointer;" @click="fileClick(scope.row.v_CheckChangeImagePath,2)" v-if="scope.row.v_CheckChangeImagePath && scope.row.v_CheckChangeImagePath.length !==0">{{ $t('2KyEk7Ir2Lz3bN9ByjSaE') }}</span>
                                                <span v-else>{{ $t('tzv7Fao_8LvfFbddIkvDu') }}</span>
                                            </template>
                                        </el-table-column>
                                        
                                        <el-table-column min-width="160" :show-overflow-tooltip="true" :label="$t('tPiWuSFanLeOKbJWvfz')" align="center">
                                            <el-table-column :show-overflow-tooltip="true" min-width="160" align="center">
                                                <template #header>
                                                    <el-input type="text" :placeholder="$t('tPiWuSFanLeOKbJWvfz')" v-model="searchVar.v_ApplyEmpName" />
                                                </template>
                                                <template #default="scoped">
                                                    <span v-if="scoped.row.v_ApplyEmpName">{{ scoped.row.v_ApplyEmpName }}</span>
                                                    <span v-else>-</span>
                                                </template>
                                            </el-table-column>
                                        </el-table-column>
                                        
                                        <!-- <el-table-column min-width="160" :show-overflow-tooltip="true" prop="v_AuditEmpName" :label="$t('sXyZ6PqmWwEIov0bNsb')" align="center" /> -->
                                        
                                        <el-table-column min-width="160" :show-overflow-tooltip="true" :label="$t('z_6MaI6MYIAjEp9UeAfF')" align="center">
                                            <el-table-column :show-overflow-tooltip="true" min-width="160" align="center">
                                                <template #header>
                                                    <el-input type="text" :placeholder="$t('z_6MaI6MYIAjEp9UeAfF')" v-model="searchVar.v_ChangeEmpName" />
                                                </template>
                                                <template #default="scoped">
                                                    <span v-if="scoped.row.v_ChangeEmpName">{{ scoped.row.v_ChangeEmpName }}</span>
                                                    <span v-else>-</span>
                                        </template>
                                            </el-table-column>
                                        </el-table-column>
                                        
                                        <!-- <el-table-column min-width="160" :show-overflow-tooltip="true" :label="$t('7YrNDepF6YGnXofIKj30l')" align="center">
                                            <template #default="scope">
                                                <span v-if="scope.row.v_JobApplyNO && scope.row.v_JobApplyNO !== ''" style="color: #07AAF9;">{{ scope.row.v_JobApplyNO }}</span>
                                                <span v-else> {{ $t('i9bg9ga34Vp7vSAeG1MlW') }} </span>
                                            </template>
                                        </el-table-column> -->
                                        
                                        <!-- <el-table-column min-width="160" :show-overflow-tooltip="true" :label="$t('4qSllUxIkPaA8Rqf3Jg8y')" align="center">
                                            <template #default="scope">
                                                <span v-if="scope.row.n_isValid === 1" style="color: #07AAF9;">{{ $t('iPfonvtxVLm7knSyCsLBo') }}</span>
                                                <span v-else style="color: #FF5F33;">{{ $t('tzm8JwYsKnqKoNhheJlJx') }}</span>
                                            </template>
                                        </el-table-column> -->
                                        
                                        <el-table-column min-width="160" :show-overflow-tooltip="true" :label="$t('9RLaVEiJf1Z1Qv15o6Kll')" align="center">
                                            <template #default="scoped">
                                                <span v-if="scoped.row.v_Remake">{{ scoped.row.v_Remake }}</span>
                                                <span v-else>-</span>
                                            </template>
                                        </el-table-column>
                                        
                                        <el-table-column min-width="160" :show-overflow-tooltip="true" prop="createdTime" :label="$t('xxAj6fsjvIsQrMdlNpolv')" align="center" />
                                        
                                        <el-table-column min-width="160" :show-overflow-tooltip="true" prop="createdUserName" :label="$t('v7AhfaNeGaFoPfZzgpFk')" align="center" />

                                        <el-table-column min-width="160" :formatter="formatDate" :show-overflow-tooltip="true" :label="$t('hMMqYalIdWhk0McqdxTg')"  align="center">
                                            <template #default="scoped">
                                                <span v-if="scoped.row.updatedTime">{{ scoped.row.updatedTime }}</span>
                                                <span v-else>-</span>
                                            </template>
                                        </el-table-column>

                                        <el-table-column min-width="160" :show-overflow-tooltip="true" :label="$t('yRc0RHyyMh9Cy0TKyYr')"  align="center">
                                            <template #default="scoped">
                                                <span v-if="scoped.row.updatedUserName">{{ scoped.row.updatedUserName }}</span>
                                                <span v-else>-</span>
                                            </template>
                                        </el-table-column>
                                        
                                        <el-table-column min-width="160" :label="$t('liBmO8wb58NMw5HLu9Nf')" align="center" fixed="right">
                                            <template #default="scope">
                                                <el-button v-if="$hasPer('safetyMeasures:detail')" @click="nodeClick(scope.row)" class="icon-e" icon="ele-View" size="small" text type="primary"> {{ $t('ucC9qxHvkvdh9OGEo1pn') }} </el-button>
                                                <template v-if="$hasPer('safetyMeasures:wczg')">
                                                    <el-button v-if="scope.row.n_CheckChangeState === 1 || scope.row.n_isValid === 2" class="icon-e" icon="ele-EditPen" size="small" text type="danger"> {{ $t('sKsIYcFjiagLSGdNmK_8') }} </el-button>
                                                    <el-button v-else @click="rectifiClick(scope.row)" class="icon-e" icon="ele-View" size="small" text type="warning"> {{ $t('45H73cAhRbPu5ADxbp0qp') }} </el-button>
                                                </template>
                                            </template>
                                        </el-table-column>
                                    
                                    </el-table>
                                </div>
                            </div>
                            <div style="height: 30px;margin-top: 20px;" class="hr-flex-start">
								<el-pagination
									v-model:currentPage="pageNo"
									v-model:page-size="pageSize"
									:total="totalRows"
									:page-sizes="[10, 20, 50, 100]"
									small
									background
									@size-change="handleSizeChange"
									@current-change="handleCurrentChange"
									layout="total, sizes, prev, pager, next, jumper"
									class="w-h-100"
								/>
							</div>
                        </div>
                    </el-card>
                </div>
            </div>
        </div>
        <!-- 整改 -->
        <saft-rectifi
            :repairInfo="repairInfo"
            :isUseDialog="isUseDialog"
            @updateData="getData"
            @cancelUseClick="cancelUseClick"
            @controlUseClick="controlUseClick"
        />
        <!-- 详情 -->
        <measures-detail 
            :repairInfo="repairInfo"
            :isUseDialog="isDetailDialog"
            @cancelDetailClick="cancelDetailClick"
        />
        <VModel
            :fileInfo="fileInfo"
            :isModelDialog="isModelDialog"
            @cancelModelClick="cancelModelClick"
        />
    </div>
</template>
<script lang="ts">
import { defineComponent, ref, onMounted , reactive , toRaw } from 'vue'
import getTableData from '/@/utils/getTableData'
import SaftRectifi from './component/saft-rectifi.vue'
import MeasuresDetail from './component/measures-detail.vue';
import { SecurityCheckChangePage } from '/@/api/sms/sms';
import useCurrentInstance from '/@/utils/hook/useCurrentInstance';
import VModel from '../components/v-model.vue';
export default defineComponent( {
    name: 'safety-measures',
    components: { SaftRectifi , MeasuresDetail , VModel },
    setup(props){
        const { proxy } = useCurrentInstance();
        const $t = proxy.$t;
        
        const isUseDialog = ref() // 新增/编辑弹出框隐藏/显示
        const isDetailDialog = ref(false)
        const repairInfo = ref() // 传递子组件数据
        const pathData = ref(import.meta.env.VITE_API_URL + '/') // 获取地址

        const isModelDialog = ref(false);
        const cancelModelClick = () => {isModelDialog.value = false};
        const fileInfo = ref('');

        /*** 查看文件 */
        const fileClick = (val: any , num: number) => {
            isModelDialog.value = true;
            let setObj: any = {};
            if(num === 1) setObj.titleInfo = $t('ms1fpd4AXyStopkHw95Z8');
            else setObj.titleInfo = $t('pAwlJ0p0qBAgZqdtvyyHh');
            setObj.rectifyListArr = val;
            fileInfo.value = JSON.stringify(setObj);
        }

        const searchVar = reactive({
            v_SecurityCheckNO: '',
            n_SecurityCheckTimesNO: '',
            v_ProjectName: '',
            hazardDetail: '',
            v_NGTypeName: '',
            v_CheckNGContent: '',
            v_ExistsContent: '',
            d_AskCompliteDate: '',
            d_CompliteDate: '',
            n_CheckChangeState: '',
            v_CheckChangeContent: '',
            v_CheckResultContent: '',
            v_ApplyEmpName: '',
            v_ChangeEmpName: '',
        });

        // 搜索类
        const searchVal = ref('1')
        const transferVal = ref() // 需要查询的值
        let searchObj:any = reactive({})
        let searchName = '1'
        /*** resetFun */
        const resetFun = () => {
            let newObj = Object.keys(searchObj)
            if(newObj.length !== 0){
                newObj.map((i:any) => {
                    searchObj[i] = ''
                })
            }
        }
        /*** 搜索类型选择事件 searchChange */
        const searchChange = (val:any) => {
            searchName = val
            transferVal.value = ''
        }
        /*** acquireChange 搜索下拉框选择的数据 ---- 传给接口数据 */
        const acquireChange = (val:any) => {
            console.log(val)
        }
        /*** searchClick 查询按钮 */
        const searchClick = () => {
            resetFun()
            if(searchName === '1'){ searchObj.searchValue = transferVal.value }
            // if(searchName === '2'){ searchObj.n_isValid = transferVal.value }
            if(searchName === '2'){ searchObj.V_SecurityCheckNO = transferVal.value }
            if(searchName === '3'){ 
                searchObj.startTime = toRaw(transferVal.value)[0] 
                searchObj.endTime = toRaw(transferVal.value)[1]
            } 
        }
        /*** resetClick 重置按钮 */
        const resetClick = () => {
            resetFun()
            transferVal.value = ''
            searchVal.value = '1'
        }
        // 搜索类

        /*** 截取日期格式方法 */
        const formatDate = (row:any, column:any) => {
          // 获取单元格数据
          console.log(row[column.property],'data')
          let data = row[column.property]
          if(data == $t('utiIUzqSzcKy0QiDc49n')){
            return '-'
          }else{
            return data
          }
        }

        /*** nodeClick 新增/编辑点击事件 */
        const nodeClick = (val:string | object) => {
            val !== '' ? repairInfo.value = JSON.stringify(toRaw(val)) : repairInfo.value = ''
            isDetailDialog.value = true
        }

        /*** rectifiClick 整改点击事件 */
        const rectifiClick = (val:string | object) => {
            val !== '' ? repairInfo.value = JSON.stringify(toRaw(val)) : repairInfo.value = ''
            isUseDialog.value = true
        }

        /*** deleteHandle 删除数据事件 */
        const deleteHandle = async (val: String | Number , updateFun: Function) => {
            console.log('删除事件')
            return
            let param = {id : val}
            try {
                // let res = await sysPosDelete(param)
                let res:any = {}
                if(res.success){
                    updateFun()
                }
            } catch (err) { return }
        }

        /*** cancelUseClick 取消事件 */
        const cancelUseClick = () => {
            isUseDialog.value = false
        }

        /*** cancelDetailClick 详情取消事件 */
        const cancelDetailClick = () => {
            isDetailDialog.value = false
        }

        /*** controlUseClick 提交事件 */
        const controlUseClick = () => {
            isUseDialog.value = false
        }

        return {
            ...getTableData(SecurityCheckChangePage,{},searchObj),
            isUseDialog,
            isDetailDialog,
            cancelUseClick,
            controlUseClick,
            cancelDetailClick,
            nodeClick,
            repairInfo,
            deleteHandle,

            // 搜索类
            searchVal,
            transferVal,
            resetClick,
            searchClick,
            searchChange,
            acquireChange,
            searchOptions: [{
                value: '1',
                label: $t('3dBd6Gp5MqNm4A5dvcqJ4')
            }, 
            // {
            //     value: '2',
            //     label: $t('4qSllUxIkPaA8Rqf3Jg8y')
            // }, 
            {
                value: '2',
                label: $t('ysIavqEMgMswxJan_7gbO')
            },{
                value: '3',
                label: $t('bxOzlOcGrW1Oanu81ddgi')
            }], // 搜索方式
            responsiblePle: [
                { label: $t('iPfonvtxVLm7knSyCsLBo') , value: 1 },
                { label: $t('tzm8JwYsKnqKoNhheJlJx') , value: 2 },
            ], // 是否启用
            // 搜索类

            pathData,
            formatDate,
            rectifiClick,
            searchVar,

            isModelDialog,
            cancelModelClick,
            fileInfo,
            fileClick,
        }
    },
} )
</script>
<style lang="scss"> @import '../style/public.scss'; </style>
<style scoped lang="scss">
    #safety-measures {
        .box-f{
            :deep(.el-form-item__label){
                padding: 0;
            }
        }
        :deep(.el-card__body) {
            height: 100%;
        }
        :deep(.el-link__inner){
            color: #0052D9;
        }
        :deep(.el-card){
            border: none !important;
        }
        ul {

            list-style: none;

            li {
                cursor: pointer;

                &:hover {
                    color: red;
                }
            }
        }
        .icon-e{
            :deep(.el-icon){
                margin-right: 0px!important;
            }
        }
    }
</style>